﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EvecScheduleEdit.aspx.cs" Inherits="Web.EvecScheduleEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>旅程明细 编辑</title>
    <base target="_self" />
    <meta content="ie=7" http-equiv="x-ua-compatible">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="0">
    <link href="Styles/Style01.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.7.min.js" type="text/javascript"></script>
    <script src="Scripts/easy_validator.pack.js" type="text/javascript"></script>
    <link href="Styles/validate.css" rel="stylesheet" type="text/css" />
    <script src="Content/scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script>
        $(function () {
            $("[reg]").parents("td").prev().append("<font color='#ff0000'>*</font>");
            $("#btnSave").click(function () {
                var isSubmit = true;
                $("form").find("[reg],[url]:not([reg])").each(function () {
                    if (!validate($(this), this.tagName)) {
                        isSubmit = false;
                    }
                });
                if (!isSubmit) {
                    alert("请确认'红字或红框'处的输入正确!");
                    return false;
                }
                var dateStart = $("#PreStartTime").val();
                var dateEnd = $("#PreEndTime").val();
                if (dateStart > dateEnd) {
                    alert("结束时间不能比开始时间小");
                    return false;
                }
                return true;
            });
        });
    </script>
</head>
<body>
<form id="Form1" runat=server><input type=hidden runat=server id=Id />
<table class="s1">
<tr><td>预计开始日期</td><td><input id="PreStartTime" runat="server" class="Wdate" onclick="WdatePicker();" title="格式:yyyy-MM-dd!" reg="."></td>
<td>预计结束日期</td><td><input id="PreEndTime" runat="server" class="Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss', minDate: '%y-%M-{%d-3}'});" title="格式:yyyy-MM-dd!" reg="."></td></tr>
<tr><td>出发地</td><td><input id="LeavePoint" runat="server" title="不能为空!" reg="."></td>
<td>到达地</td><td><input id="ArrivePoint" runat="server" title="不能为空!" reg="."></td></tr>
<tr><td>交通工具</td><td><select id="TrafficTool" runat="server" reg="." title="请选择性别!">
        <option></option><option>火车</option><option>汽车</option><option>飞机</option><option>轮船</option>
        <option>公司派车</option><option>自驾车</option><option>其他</option></select></td><td></td><td></td></tr>
<tr><td>备注</td><td colspan=3><input id="Cause" runat="server"></td></tr>
</table>
<div style="text-align:right;margin-right:24px;margin-top:6px;">
    <asp:button runat="server" text="保存" id="btnSave" onclick="btnSave_Click"/>
    <input type=button value="关闭" onclick="window.close();" />
</div>
</form>
</body>
</html>